package pseudoAssemblerCompiler.twopassassembler.view.ui.autocomplete;

/**
 * User: Selivanov
 * Date: 08.05.12
 * Time: 0:14
 */
public class DefaultComboDisplayFormat<T> implements ComboDisplayFormat<T> {

    @Override
    public String getDisplayName(T object) {
        return object == null ? "" : object.toString();
    }

    @Override
    public String getPrimaryKey(T object) {
        return object == null ? "0" : String.valueOf(object.hashCode());
    }

    @Override
    public String getDescription(T object) {
        return null;
    }
}
